<?php
namespace Application\Api\Controller;

class Document extends Base
{

    public function getListAction()
    {
        $data = $this->getRequestData();
        $categoryId = (int)$data['id'];
        $list = $this->get(SERVICE_DOCUMENT)->getList($categoryId);
        $list = $this->get(SERVICE_FILE)->getFileData($list, ['dry_image' => 2, 'dry_video' => 2]);
        $data = [
            'oss_domain' => getOssDomain(),
            'list' => $list
        ];
        $this->sendSuccess($data);
    }

}